<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/3Column.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<padnug.Domain.Event>>" %>

<asp:Content ContentPlaceHolderID="TitleContent3Column" runat="server">Portland Area .Net User Group Events</asp:Content>
<asp:Content ContentPlaceHolderID="BodyTagAttributes3Column" runat="server">id="meetingsPage"</asp:Content>

<asp:Content ContentPlaceHolderID="LeftContent" runat="server">

    <% Html.RenderPartial("_padnugFriendsControl"); %>

    <% Html.RenderPartial("_membershipToolsControl"); %>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Meetings and Events</h2>

    <table>
        <tr>
            <%--<th></th>
            <th>
                ID
            </th>--%>
            <th>
                Meeting Date
            </th>
            <th>
                Host
            </th>
            <th>
                Topic
            </th>
            <%--<th>
                Latitude
            </th>
            <th>
                Longitude
            </th>--%>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr onclick="showHideElement('minutes_<%= item.ID%>')">
            <%--<td>
                <%= Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) %> |
                <%= Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ })%>
            </td>
            <td>
                <%= Html.Encode(item.ID) %>
            </td>--%>
            <td><%
                var meetingDate = item.MeetingDate.HasValue ? item.MeetingDate.Value.ToShortDateString() : string.Empty; 
           
           %><%= Html.Encode(meetingDate)%>&nbsp;<%= Html.Encode(item.MeetingTime) %><br />Location:<br /><%= item.Location %>
            </td>
            <td>
                <%= item.Host %>
            </td>
            <td>
                <%= item.Topic %>
                <div id="minutes_<%= item.ID%>" style="display:none;"><table><tr><td><%= item.Minutes %></td></tr></table></div>
            </td>
            <%--<td>
                <%= Html.Encode(String.Format("{0:F}", item.Latitude.HasValue ? item.Latitude.Value : 0)) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:F}", item.Longitude.HasValue ? item.Longitude.Value : 0)) %>
            </td>--%>

        </tr>
    
    <% } %>

    </table>
<%--
    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>--%>

</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="RightContent" runat="server">

    <% Html.RenderPartial("_featuredSponsorsControl", (List<padnug.Models.Home.Sponsor>)ViewData["FeaturedSponsors"]); %>
    
    <% Html.RenderPartial("_eventsControl", new List<padnug.Models.Home.EventNote>()); %>

</asp:Content>
